package com.ibeeking.found.common.enums;
/**
 *  @ClassName OpenApiConfigEnum
 * @Author ibeeking
 * @Date 2021/7/5 10:46
 * @Version 1.0
 * @Description 开放平台类型定义
 */
public enum AliDingTalkAppTypeEnum {

    ALIDINGTALK_CORP_APP_TYPE_MA(1,"钉钉开放平台_企业内部应用_小程序"),
    ALIDINGTALK_CORP_APP_TYPE_WEB(2,"钉钉开放平台_企业内部应用_H5应用"),
    ALIDINGTALK_TP_APP_TYPE_MA(3,"钉钉开放平台_第三方企业应用_小程序"),
    ALIDINGTALK_TP_APP_TYPE_WEB(4,"钉钉开放平台_第三方企业应用_H5应用"),
    ALIDINGTALK_TP_APP_TYPE_PERSON(5,"钉钉开放平台_第三方个人应用"),
    ;

    private Integer code;
    private String value;

    AliDingTalkAppTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(Integer code) {
        for (AliDingTalkAppTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
